
<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" name="viewport" />
    <meta http-equiv="content-script-type" content="text/javascript">
    <meta name="format-detection" content="telephone=no" />
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
            <link rel="shortcut icon" href="/favicon.ico">
            <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="0" />
    <title>地址管理</title>
    <link rel="stylesheet"href="statics/mobile/css/style.css?v=201708115933363455">
    <link rel="stylesheet"href="statics/mobile/css/SpsBtn.css?v=201708115933363455">

    <link rel="stylesheet"href="statics/mobile/css/User/addressManage.css?v=201708115933363455">

</head>

<body style="">


<div class="membersbox pad50">
    <b id="htmlReplace-navCart"></b>
</div>



	<script type="text/j-template" id="j-addrM-list" >
	<%if(showAnimate){%>
		<section class="adrM adrM-list hide">
	<%}else{%>
		<section class="adrM adrM-list">
	<%}%>
	    <header class="top">
	    	<%if(showBackButton){%>
		        <a href="javascript:;" class="btn-backArrow j-addrM-back">
		            <i class="icon-back"></i>
		        </a>
			<%}%>
	        <span><%=title%></span>
	    </header>

	    <section class="content">
	        <ul class="list">
	        	<%_.each(lists,function(item){%>
		            <li class="bdbox">
		                <a class="infos j-select-address" data-id="<%=item.address_id%>">
		                    <p>
		                        <span class="name"><%=item.name%></span>
		                        <span class="mobile"><%=item.mobile%></span>
		                    </p>
		                    <p><%=item.province%> <%=item.city%> <%=item.area%> <%=item.address%></p>
		                </a>
		                <div class="actions clearfix">
		                    <a href="javascript:;" data-id="<%=item.address_id%>" class="btn-check fl j-addrM-setDefault <%if(item.is_default_address==1){%>checked<%}%>">
		                        <i class="icon-check bdbox"></i>
		                        <%if(item.is_default_address==1){%>
		                        	<span>默认</span>
		                        <%}else{%>
		                        	<span>设为默认</span>
		                        <%}%>
		                    </a>
		                    <a href="javascript:;" data-id="<%=item.address_id%>" class="fr j-addrM-del">
		                        <i class="icon-del"></i>
		                        <span>删除</span>
		                    </a>
		                    <a href="javascript:;" data-id="<%=item.address_id%>" class="fr j-addrM-edit">
		                        <i class="icon-edit"></i>
		                        <span>编辑</span>
		                    </a>
		                </div>
		            </li>
	            <%})%>
	        </ul>
	    </section>

	    <%if(showSyncWechatAddressBtn){%>
		    <footer class="bottom claerfix twobtn">
		        <a href="javascript:;" class="fl j-addrM-add">添加新地址</a>
		        <a href="javascript:;" class="fl green j-addrM-syncWechat">同步微信地址</a>
		    </footer>
	    <%}else{%>
	    	<footer class="bottom">
		        <a href="javascript:;" class="j-addrM-add">添加新地址</a>
		    </footer>
	    <%}%>
	</section>
</script>
<!-- end 收货地址列表 -->

<script type="text/j-template" id="j-addrM-add" >
    <section class="adrM adrM-add hide">
	    <header class="top">
	        <a href="javascript:;" class="btn-backArrow j-addrM-back">
	            <i class="icon-back"></i>
	        </a>
	        <%if(data.type=="add"){%>
	        	<span>添加新地址</span>
	        <%}else{%>
	        	<span>编辑地址</span>
	        <%}%>
	    </header>

	    <section class="content">
	        <ul class="add">
	            <li class="clearfix">
	                <label class="bdbox"><span class="colorRed">*</span> 收货人：</label>
	                <input type="text" name="name" id="name" placeholder="请填写收货人的姓名" value="<%=data.name%>" class="ip">
	            </li>
	            <li class="clearfix">
	                <label class="bdbox"><span class="colorRed">*</span> 手机号码：</label>
	                <input type="tel" name="mobile" placeholder="请填写收货人的手机号码" value="<%=data.mobile%>" class="ip">
	            </li>
	            <li class="clearfix">
					<input type="hidden" class="isNeedAddress" value="1">
	                <label class="bdbox"><%if (isNeedAddress == 1) {%><span class="colorRed">*</span><%}%>  收货地区：</label>
	                <a href="javascript:;" class="ip j-addrM-selectArea">
		                <%if(data.province && data.province.length && data.city.length){%>
		                	<%=data.province%> <%=data.city%>
		                	<%if(data.area && data.area.length){%>
		                		<%=data.area%>
		                	<%}%>
		                <%}else{%>
		                	点击选择
		                <%}%>
	                </a>
	            </li>
	            <li class="clearfix">
	                <label class="bdbox"> 邮政编码：</label>
	                <input type="tel" name="zip" placeholder="请填写邮政编码" value="<%=data.zip%>" class="ip">
	            </li>
	            <li class="clearfix textarea">
	                <label class="bdbox"><span class="colorRed">*</span> 详细地址：</label>
	                <textarea name="address" class="bdbox" placeholder="请填写详细的地址"><%=data.address%></textarea>
	            </li>
	        </ul>
	    </section>

	    <footer class="bottom">
	    	<%if(data.type=="add"){%>
	        	<a href="javascript:;" class="j-addrM-add">保存并使用</a>
	        <%}else{%>
	        	<a href="javascript:;" data-id="<%=data.address_id%>" class="j-addrM-add">保存</a>
	        <%}%>
	    </footer>
	</section>
</script>
<!-- end 编辑\添加地址 -->

<script type="text/j-template" id="j-addrM-selectArea-province" >
    <section class="adrM adrM-selectArea adrM-selectArea-province hide">
	    <header class="top">
	        <a href="javascript:;" class="btn-backArrow j-addrM-back">
	            <i class="icon-back"></i>
	        </a>
	        <span>请选择省份</span>
	    </header>

	    <section class="content">
	        <ul class="area-list">
	        	<%_.each(data,function(item){%>
		            <li>
		                <a href="javascript:;" data-provinceid="<%=item.province_id%>"><%=item.province_name%></a>
		            </li>
	            <%})%>
	        </ul>
	    </section>
	</section>
</script>
<!-- end 选择收货地区-省 -->

<script type="text/j-template" id="j-addrM-selectArea-city" >
    <section class="adrM adrM-selectArea adrM-selectArea-city hide">
	    <header class="top">
	        <a href="javascript:;" class="btn-backArrow j-addrM-back">
	            <i class="icon-back"></i>
	        </a>
	        <span>请选择城市</span>
	    </header>

	    <section class="content">
	        <ul class="area-list">
	        	<%_.each(data,function(item){%>
		            <li>
		                <a href="javascript:;" data-cityid="<%=item.city_id%>"><%=item.city_name%></a>
		            </li>
	            <%})%>
	        </ul>
	    </section>
	</section>
</script>
<!-- end 选择收货地区-市 -->

<script type="text/j-template" id="j-addrM-selectArea-area" >
    <section class="adrM adrM-selectArea adrM-selectArea-area hide">
	    <header class="top">
	        <a href="javascript:;" class="btn-backArrow j-addrM-back">
	            <i class="icon-back"></i>
	        </a>
	        <span>请选择区域</span>
	    </header>

	    <section class="content">
	        <ul class="area-list">
	        	<%_.each(data,function(item){%>
		            <li>
		                <a href="javascript:;" class="noArrow" data-areaid="<%=item.area_id%>"><%=item.area_name%></a>
		            </li>
	            <%})%>
	        </ul>
	    </section>
	</section>
</script>
<!-- end 选择收货地区-区 -->

<?php include VIEWS_PATH."footer.php";?>


<script>
        var addressList_isGetWechatAdd=false;
        var isNeedAddress = 1;
</script>
<script src="statics/mobile/js/dist/User/addressManage.js?v=201708115933363455"></script>
<script src="statics/mobile/js/dist/User/addressList.js?v=201708115933363455"></script>

</body>
</html>
<!-- 20170105 -->
